namespace ActorSystem
{
    public abstract class BuffBase
    {
        /// <summary>
        /// 伤害效果名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 开始buff
        /// </summary>
        public virtual void OnStart() { }
        /// <summary>
        /// 当触发伤害效果 --如果是持续伤害或者定时debuff, 你需要克隆一个buff进行处理这些效果
        /// </summary>
        public virtual void OnTrigger() { }
        /// <summary>
        /// 伤害效果每帧更新
        /// </summary>
        /// <returns>是否还继续更新，true继续更新，false不再更新</returns>
        public virtual bool OnUpdate() => false;
    }

    public class BuffBase<ACTOR> : BuffBase where ACTOR : ActorBase
    {
        /// <summary>
        /// 攻击对象
        /// </summary>
        public ACTOR Self { get; set; }
        /// <summary>
        /// 被攻击对象
        /// </summary>
        public ACTOR Target { get; set; }
    }
}